package com.ihrm.system.dao;

import com.ihrm.domain.system.UserRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserRoleDao {
    @Delete("delete from pe_user_role ")
    void delByIds(String userId);


    void insertBatch(Map map);

    @Select("select * from pe_user_role where user_id = #{userId}")
    List<UserRole> getRolesByUserId(String userId);

    @Select("select * from pe_user_role where role_id = #{roleId}")
    List<UserRole> getByRoleId(String roleId);
}
